﻿using System;


namespace HAVNet.Intros.ParseTree
{
    public delegate bool SymbolNodeVisitFunction (NodeSymbol treeNode, int depth);

    public abstract class NodeSymbol
    {
        public readonly NodeSymbol parent = null;

        public NodeSymbol (NodeSymbol parent)
        {
            this.parent = parent;
        }

        public abstract void add    (NodeSymbol treeNode);
        public abstract void remove (NodeSymbol treeNode);
        public abstract bool visit  (SymbolNodeVisitFunction f, int depth);
    }
}
